package debtbundler.domain.entity.impl;

import java.util.logging.Level;
import java.util.logging.Logger;

import debtbundler.domain.entity.Debt;
import debtbundler.domain.entity.Person;

class DebtImpl extends AbstractTransactionImpl implements Debt {
	
	private static final long serialVersionUID = 1L;
	private static Logger logger = Logger.getLogger(DebtImpl.class.getName());

	protected DebtImpl(PersonImpl debtor, PersonImpl creditor) {
		super(debtor, creditor);
		logger.log(Level.FINE, "Created debt {0}", this);
	}

	@Override
	public Person getCreditor() {
		return (Person)this.toPool;
	}

	@Override
	public Person getDebtor() {
		return (Person)this.fromPool;
	}
	
}
